package com.dfqy.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * Author : atyushu
 * Package : com.dfqy.pojo
 * ClassName : Event
 * Create : 2023/8/1 - 17:31
 * Version : v1.0
 * Description : The class of pojo for d_event.
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("活动讲座")
public class Event implements Serializable {

    @NotNull
    private long id;

    @ApiModelProperty("内容")
    private String event;

    @ApiModelProperty("发布人")
    private String poster;

    @ApiModelProperty("发布时间")
    @JsonFormat(locale = "zh", pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date posttime;

    @ApiModelProperty("活动开始时间")
    @JsonFormat(locale = "zh", pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date starttime;

    @ApiModelProperty("活动结束时间")
    @JsonFormat(locale = "zh", pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date finishtime;

    @ApiModelProperty("活动地点")
    private String addr;

    @ApiModelProperty("活动人数")
    private int nums;

    @ApiModelProperty("活动类型")
    private String stype;

    @ApiModelProperty("页面浏览次数")
    private int visitnums;

    @ApiModelProperty("列表页, 图片地址")
    private String coverimage;

    @ApiModelProperty("活动标题")
    private String title;

    public Event(String event, String poster, Date posttime, Date starttime, Date finishtime, String addr, int nums, String stype, int visitnums, String coverimage, String title) {
        this.event = event;
        this.poster = poster;
        this.posttime = posttime;
        this.starttime = starttime;
        this.finishtime = finishtime;
        this.addr = addr;
        this.nums = nums;
        this.stype = stype;
        this.visitnums = visitnums;
        this.coverimage = coverimage;
        this.title = title;
    }
}
